package com.pojoin.cms.face;

import com.pojoin.cms.exception.CmsException;

/**
 * 所有Face层的父接口
 * @author pojoin
 * @date
 */
public interface BaseFace {
	/**
	 * 判断持久化是否有效
	 * @return
	 */
	boolean isPersistenceAvailable();
	
	/**
	 * 从持久层删除当前实体
	 * @throws GesoaServiceException 
	 */
	void delete() throws CmsException;

	/**
	 * 将当前实体写入到持久层
	 * @throws GesoaServiceException 
	 */
	void flush() throws CmsException;

	/**
	 * 放弃当前实体的任何修改，重新从持久层读取数据
	 * @throws GesoaServiceException 
	 */
	void reload() throws CmsException;

}
